#encoding=utf8
'''
Created on 2012-10-9

@author: Administrator
'''
from pub import Func
from pub.Config import Config
class Messages(object):
    '''
    消息信息模型
    '''
    TABLE_NAME="sq_message"
    PRIMARY_KEY="Id"
    MSGTITLE="Title"
    MSGCONTENT="Content"
    CREATED="Created"
    MSGTYPE="Msgtype"
    MSGSENDER="MsgSender"
    MSGRECIEVER="MsgReciever"
    MSGSTATE="MsgState"
    MSGSENDED="MsgSended"
    def __init__(self,):
        '''
        Constructor
        '''
#        消息编号
        self.__Id = Config.I_SYS_ZERO
#        消息标题
        self.__Title = Config.S_SYS_NONE
#        消息内容
        self.__Content = Config.S_SYS_NONE
#        消息创建时间
        self.__Created = Func.getNow()
#        消息类型：1 系统消息  2  用户消息 3:v加好友信息
        self.__Msgtype = Config.I_SYS_ZERO
#        消息发送人，值为0时为系统超级用户
        self.__MsgSender = Config.I_SYS_ZERO
#        消息接收人
        self.__MsgReciever = Config.I_SYS_ZERO
#        消息读取状态
        self.__MsgState = Config.I_SYS_ZERO
#        消息发送状态
        self.__MsgSended = Config.I_SYS_ZERO

    def get_msg_state(self):
        return self.__MsgState


    def get_msg_sended(self):
        return self.__MsgSended


    def set_msg_state(self, value):
        self.__MsgState = value


    def set_msg_sended(self, value):
        self.__MsgSended = value


    def get_id(self):
        return self.__Id


    def get_title(self):
        return self.__Title


    def get_content(self):
        return self.__Content


    def get_created(self):
        return self.__Created


    def get_msgtype(self):
        return self.__Msgtype


    def get_msg_sender(self):
        return self.__MsgSender


    def get_msg_reciever(self):
        return self.__MsgReciever


    def set_id(self, value):
        self.__Id = value


    def set_title(self, value):
        self.__Title = value


    def set_content(self, value):
        self.__Content = value


    def set_created(self, value):
        self.__Created = value


    def set_msgtype(self, value):
        self.__Msgtype = value


    def set_msg_sender(self, value):
        self.__MsgSender = value


    def set_msg_reciever(self, value):
        self.__MsgReciever = value


    def del_id(self):
        del self.__Id


    def del_title(self):
        del self.__Title


    def del_content(self):
        del self.__Content


    def del_created(self):
        del self.__Created


    def del_msgtype(self):
        del self.__Msgtype


    def del_msg_sender(self):
        del self.__MsgSender


    def del_msg_reciever(self):
        del self.__MsgReciever
